// Agent scout in project MAPC

/* Initial beliefs and rules */
{ include("rules.asl") } 

goal(explore).

// Also an ordinary agent
{ include("agent.asl") }

/**************************
***SCOUT SPECIFIC CODE****
**************************/
 	
/* Exploring the environment */
+!get_new_target
		: 	goal(explore) 
		& 	not pos(_,_,_)
		<- .wait("+pos(_,_,_)");
			!get_new_target.

+!get_new_target 
		: 	goal(explore) 
		&	pos(X,Y,_)
		&	jia.scout_target(X,Y,TX,TY)
		<-	-+target_pos(TX,TY).

// finished scouting -> herd!
+!get_new_target 
		: 	goal(explore)
		/* 		&	pos(X,Y,_)
		&	jia.scout_target(X,Y,X,Y) */
		<-	-+goal(herd).		